package ar.uba.fi.RSACryptoFiuba.model.keygeneration;

import ar.uba.fi.RSACryptoFiuba.model.RSAMessage;

public class RSAKeyGenerationMessage extends RSAMessage{
	
	private String p;
	private String q;
	private String n;
	private String phi;
	private String d;
	private String e;
	
	public RSAKeyGenerationMessage(){
		this.p = "";
		this.q = "";
		this.n = "";
		this.phi = "";
		this.d = "";
		this.e = "";
		setChanged();
		notifyObservers(this);
	}
	
	public boolean isCompleted(){
		return this.p != "" &&	this.q != "" && this.n != "" && this.phi != "" && this.d != "" && this.e != "";
	}
	
	public boolean isStarted(){
		return this.p != "" ||	this.q != "" || this.n != "" || this.phi != "" || this.d != "" || this.e != "";
	}
	
	public String getP() {
		return p;
	}
	
	public void setP(String p) {
		this.p = p;
		setChanged();
        notifyObservers(this);
	}
	
	public String getQ() {
		return q;
	}
	
	public void setQ(String q) {
		this.q = q;
		setChanged();
		notifyObservers(this);
	}
	
	public String getN() {
		return n;
	}
	
	public void setN(String n) {
		this.n = n;
		setChanged();
		notifyObservers(this);
	}
	
	public String getPhi() {
		return phi;
	}
	
	public void setPhi(String phi) {
		this.phi = phi;
		setChanged();
		notifyObservers(this);
	}
	
	public String getD() {
		return d;
	}
	
	public void setD(String d) {
		this.d = d;
		setChanged();
		notifyObservers(this);
	}
	
	public String getE() {
		return e;
	}
	
	public void setE(String e) {
		this.e = e;
		setChanged();
		notifyObservers(this);
	}

}
